package com.pogita.cleancode.testprotectionjava.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Entity
@Table(name = "borrow_record")
@Getter
@Setter
@NoArgsConstructor
public class BorrowRecord {
    public BorrowRecord(int bookId, String username) {
        this.bookId = bookId;
        this.username = username;
    }

    @Id
    @Column(name = "id")
    private int id;

    @Column(name = "book_id")
    private int bookId;

    @Column(name = "username")
    private String username;

    @Column(name = "start_at")
    private Date startAt;
}
